package com.dkm.ec.product.strategy.impl;

import java.util.List;

import com.dkm.base.core.helper.SpringHelper;
import com.dkm.ec.product.context.StrategyContext;
import com.dkm.ec.product.persistence.entity.ProductEntityPo;
import com.dkm.ec.product.repository.ProductEntityRepository;
import com.dkm.ec.product.strategy.RecommendStrategy;

public class CommonProductManualStrategyImpl implements RecommendStrategy {

	@Override
	public List<ProductEntityPo> find(StrategyContext context, Integer count) {
		ProductEntityRepository productEntityRepository = SpringHelper.getBean(ProductEntityRepository.class);
		if(context==null)context = new StrategyContext();
		return productEntityRepository.findProdRec( context.getUserId(),  context.getProductId(),  count);
	}

}
